aux_source_directory(. SOURCESCODE)
include_directories(.)
include_directories(/usr/include/cjson/)
find_library(GLIBC_LIB glib-2.0)
find_library(DBUS_LIB dbus-1)
find_library(DBUS_GLIB_LIB dbus-glib-1)
find_package(PkgConfig)
add_library(kysdk-sysinfo SHARED ${SOURCESCODE})
set_target_properties(kysdk-sysinfo PROPERTIES VERSION 2.0.0 SOVERSION 1)
#add_executable(kysysinfo-test test/kysysinfo_test.c)
target_link_libraries(kysdk-sysinfo dl kysdk-log systemd kysdk-config X11 Xrandr libcjson.so pci kmod ${GLIBC_LIB} ${DBUS_LIB} ${DBUS_GLIB_LIB})
#target_link_libraries(kysysinfo-test kysdk-sysinfo libcjson.so)
# target_link_libraries(kysysinfo-test kysdk-sysinfo kylin-activation kysdk-log systemd kysdk-config ${GLIBC_LIB} ${DBUS_LIB} ${DBUS_GLIB_LIB})

install(TARGETS kysdk-sysinfo
        DESTINATION ${CMAKE_INSTALL_RPATH})
        
install(FILES libkysysinfo.hpp
        DESTINATION include/kysdk/kysdk-system)

install(FILES libkysysinfo.h
        DESTINATION include/kysdk/kysdk-system)
